<?php $this->load->view("general/header");?>
<div id="view_invoice" class="page_">
    <div class="form">              
        <div class="form_header"><a href="#">Lihat Daftar Barang Masuk</a> </div>
        <div class="content_data" id="content_datax">
        	<div id="selectplace" align="right">
                
               <select  id="merk"  name="merk">
                            <option value="" selected="selected">::: Pilih Merk :::</option>
                            <?php foreach ($merk as $merk1){?>
                                <option value="<?php echo $merk1['merk_name'];?>"><?php echo $merk1['merk_name'];?></option>
                            <?php }?>
                    </select>
                    <select id="cat" name="cat">
                            <option value="" selected="selected">::: Pilih Kategori :::</option>
                            <?php foreach ($cat as $cat1){?>
                                <option value="<?php echo $cat1['cat_name'];?>"><?php echo $cat1['cat_name'];?></option>
                            <?php }?>
                    </select>
                    
                     <input type="text" id="inputjenis" placeholder="Masukan Nama Barang"/>
                    <input type="text" id="inputTglStart" placeholder="Waktu Mulai" onkeydown="if (event.keyCode == 13) document.getElementById('btnSearch').click()"/>
                    <input type="text" id="inputTglEnd" placeholder="Waktu Akhir" onkeydown="if (event.keyCode == 13) document.getElementById('btnSearch').click()"/>

              <input type="button" name="btnSearch" id="btnSearch" value="Cari" class="button_red" onclick="javascript:inItemJenisBarang('#inputjenis', '#searchPlace', '0')"/>
            </div>
            <div class="success"><?php echo (isset($success))?$success:"";?>&nbsp;</div>
            <div id="searchPlace">
           <div id="pager1" class="pager1">
        		<table id="background-image"> 
                    <thead> 
                        <tr> 
                        	<th>Barcode</th>
                            <th>Merk</th>
                            
                            <th>Jenis</th>
                            <th>Nama</th> 
                            <th>Jumlah Masuk</th>
                            <th>Nama Staff</th>
                            <th>Tanggal Dan Jam</th>
                            <th>Diubah Oleh</th>
                            <th>Alasan Ubah</th>
                            <th>Action</th>
                           
                        </tr> 
                    </thead> 
                    <tbody> 
                        <?php foreach ($added as $added1){?>
                        
                        <tr>
                        	<td width="13%"><?php echo $added1['barcode_id'];?></td>
                        	<td><?php echo $added1['item_merk'];?></td>
                             
                            <td><?php echo $added1['item_cat'];?></td> 
                            <td width="13%"><?php echo $added1['item_name'];?></td> 
                            <td><?php echo $added1['total'];?></td>
                            <td><?php echo $added1['namasales'];?></td>
                            <td><?php echo $added1['date'];?></td>
                            <td><?php echo $added1['change_by'];?></td>
                            <td><?php echo $added1['reason'];?></td>
                            <td align="center" width="13%"><a href="<?php echo site_url('inItem/edit/' . $added1['inItem_id'] . '/fromview/')?>">Ubah</a> | <a href="<?php echo site_url('inItem/delete/'. $added1['inItem_id']) .'/'.$added1['stock_out'].'/'.$added1['id'].'/fromview'?>" onclick="return confirm('Apakah Anda ingin menghapus data <?php echo $added1['item_name'];?>\n(Stok <?php echo $added1['item_merk'] . " " . $added1['item_name'];?> akan berkurang <?php echo $added1['stock_out']; ?>) ?')">Hapus</a></td>
                            
                                               
                        </tr> 
                        <?php } ?>
                       
                   </tbody> 
                    
			</table>
            
            <form>
                        <img src="<?php echo base_url();?>img/first.png" class="first" title="back to first"/>
                        <img src="<?php echo base_url();?>img/prev.png" class="prev" title="previous"/>
                        <input type="text" class="pagedisplay"/>
                        <img src="<?php echo base_url();?>img/next.png" class="next" title="next"/>
                        <img src="<?php echo base_url();?>img/last.png" class="last" title="go to last"/>
                       
                        <select class="pagesize">
                            <option selected="selected"  value="10">10</option>
                            <option value="15">15</option>
                            
                        </select>
                    
                    </form>
        </div>
    </div>      
</div>

<?php $this->load->view("general/footer");?>